package com.magenta.maxoptra.gis.distancematrix.events;

import com.magenta.maxoptra.gis.distancematrix.Event;
import com.magenta.maxoptra.gis.distancematrix.EventType;
import com.magenta.maxoptra.gis.distancematrix.UpdateResultType;

/**
 * @author Sergey Grachev
 */
public final class MatrixUpdateFinishedEvent implements Event {

    private static final long serialVersionUID = -9228918454754961L;

    private final long groupId;
    private final long matrixId;
    private final UpdateResultType resultType;

    MatrixUpdateFinishedEvent(final long groupId, final long matrixId, final UpdateResultType resultType) {
        this.groupId = groupId;
        this.matrixId = matrixId;
        this.resultType = resultType;
    }

    @Override
    public EventType getType() {
        return EventType.MATRIX_UPDATE_FINISHED;
    }

    public long getGroupId() {
        return groupId;
    }

    public long getMatrixId() {
        return matrixId;
    }

    public UpdateResultType getResultType() {
        return resultType;
    }

    @Override
    public String toString() {
        return "MatrixUpdateFinishedEvent{" +
                "groupId=" + groupId +
                ", matrixId=" + matrixId +
                ", resultType=" + resultType +
                '}';
    }
}
